
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'BOOT8'


repeat
wait 0 
until if Player.Defined(0)

//LOAD ALL WEAPONS
for 4@ = 321 to 372 step 1
    if and                                                  
       not 4@ == 327                                       
       not 4@ == 328                                       
       not 4@ == 329                                       
       not 4@ == 330                                       
       not 4@ == 340                                       
       not 4@ == 345                                       
       not 4@ == 354                                       
       not 4@ == 332                                       
    then                                                    
        Model.Load(4@)                                     
        038B: load_requested_models                         
    end                                                     
end

WHILE TRUE
    WAIT 0
    
        Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)                                                                                                                             
        if 0AE1: 2@ = random_actor_near_point 7@ 8@ 9@ in_radius 500.0 find_next 1 pass_deads 0 //IF and SET                                                                  
        jf continue                                                                                                                                                                  
        IF NOT 2@ == -1                                                                                                                                                   
        jf continue                                                                                                                                                          
        IF 056D:   actor 2@ defined                                                                                                                                   
        jf continue
        22@ = actor.Health(2@)                  
        if or                                                 
            22@ == 100                                        
            22@ <= 100                                        
        then                                                  
            if not 22@ <> 100                                 
            then 
                Actor.Health(2@) = 200
                Actor.WeaponAccuracy(2@) = 75
                07DD: set_actor 2@ attack_rate 80 // previously known as temper_to
                077A: set_actor 2@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
                05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR 
                0209: 4@ = random_int_in_ranges 22 38 
                if and                                                       
                   not 4@ == 39                                              
                   not 4@ == 40                                              
                   not 4@ == 44                                              
                   not 4@ == 45                                              
                   not 4@ == 19                                              
                   not 4@ == 20                                              
                   not 4@ == 21                                              
                THEN
                    if not actor.Dead(2@)
                    jf continue
                    if not Actor.HasWeapon(2@, 4@)                              
                    then Actor.GiveWeaponAndAmmo(2@, 4@, 999999)                
                    end       
                END                                              
            end                                               
        end                                                   
END